package com.zcyh.exam.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 试卷-考试用户中间表
 * 用于记录哪些网格员需要考试，或考试实际开始时间
 * @author timo 2021/3/31
 */
@Data
@TableName("exam_test_paper_user")
@NoArgsConstructor
public class TestPaperUser {

    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    /**用户id*/
    private String userId;
    /**用户名*/
    private String userName;
    /**试卷id*/
    private String testPaperInfoId;

    /**开始时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date starTime;
    /**结束时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    public TestPaperUser(String userId, String userName, String testPaperInfoId, Date starTime) {
        this.userId = userId;
        this.userName = userName;
        this.testPaperInfoId = testPaperInfoId;
        this.starTime = starTime;
    }
}
